package com.company.fcade;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileWriter {
    public void write(String encryptSrtr,String fileNameDes){
        System.out.println("保存密文，写入文件.");
        try {
            FileOutputStream outFS=new FileOutputStream((fileNameDes));
            outFS.write(encryptSrtr.getBytes());
            outFS.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
